package com.github.barry.service.Impl

/**
 * @ClassName UserServiceImpl
 * @Description TODO
 * @Author wangxuexing
 * @Date 2020/3/17 10:54
 * @Version 1.0
 */
import com.github.barry.dao.UserDao
import com.github.barry.entity.User
import com.github.barry.service.UserService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Service

@Service(value = "userService")
class UserServiceImpl @Autowired() (val userSupport: UserDao) extends UserService {

  /**
   * save model to db
   */
  override def save(model: User): User = {
    this.userSupport.save(model)
  }

  /**
   * find model by page
   */
  override def findAll(): java.lang.Iterable[User] = {
    this.userSupport.findAll()
  }

}
